package org.adit.spring.hibernate.entity;


import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.OneToMany;

import FleetEngineIntf.StatusInfo;

@Entity
public class Route implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id @GeneratedValue
	private Long id;
	
	// Objeto que irao popular o XML de entrada
	@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
    @JoinColumn(name="route_fk")
	private List<ResourceType> resourceTypes;
	@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
    @JoinColumn(name="route_fk")
	private List<Recurso> recursos;
	@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
    @JoinColumn(name="route_fk")
	private List<Ponto> pontos;

	private String optimizeStartID;	
	@Lob
	private String xml;	
	@Lob
	private String xmlOutput;	
	private String tipo;		
	private int tipoRequisicao;	//Para Separar Stop - GetResults... TODO
	private String descricao;
	private StatusInfo statusFleet;	
	private Date data;
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public List<ResourceType> getResourceTypes() {
		return resourceTypes;
	}
	public void setResourceTypes(List<ResourceType> resourceTypes) {
		this.resourceTypes = resourceTypes;
	}
	public List<Recurso> getRecursos() {
		return recursos;
	}
	public void setRecursos(List<Recurso> recursos) {
		this.recursos = recursos;
	}
	public List<Ponto> getPontos() {
		return pontos;
	}
	public void setPontos(List<Ponto> pontos) {
		this.pontos = pontos;
	}
	public String getOptimizeStartID() {
		return optimizeStartID;
	}
	public void setOptimizeStartID(String optimizeStartID) {
		this.optimizeStartID = optimizeStartID;
	}
	public String getXml() {
		return xml;
	}
	public void setXml(String xml) {
		this.xml = xml;
	}
	public String getXmlOutput() {
		return xmlOutput;
	}
	public void setXmlOutput(String xmlOutput) {
		this.xmlOutput = xmlOutput;
	}
	public String getTipo() {
		return tipo;
	}
	public void setTipo(String tipo) {
		this.tipo = tipo;
	}
	public int getTipoRequisicao() {
		return tipoRequisicao;
	}
	public void setTipoRequisicao(int tipoRequisicao) {
		this.tipoRequisicao = tipoRequisicao;
	}
	public String getDescricao() {
		return descricao;
	}
	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}
	public StatusInfo getStatusFleet() {
		return statusFleet;
	}
	public void setStatusFleet(StatusInfo statusFleet) {
		this.statusFleet = statusFleet;
	}
	public Date getData() {
		return data;
	}
	public void setData(Date data) {
		this.data = data;
	}




}